package com.manor.main.adapter

import android.widget.ImageView
import android.widget.TextView
import com.bumptech.glide.Glide
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.manor.main.R
import com.manor.main.bean.MyGuardBean

class KMyGuardAdapter(layoutResId: Int, data: MutableList<MyGuardBean>?) : BaseQuickAdapter<MyGuardBean, BaseViewHolder>
(layoutResId, data) {

    override fun convert(helper: BaseViewHolder, item: MyGuardBean) {
        val riv_hader = helper.getView<ImageView>(R.id.riv_hader)
        val im_view = helper.getView<ImageView>(R.id.im_view)

        val tv_name = helper.getView<TextView>(R.id.tv_name)

        val tv_context = helper.getView<TextView>(R.id.tv_context)
        val tv_btn = helper.getView<TextView>(R.id.tv_btn)
        Glide.with(context).load(item.avatar).into(riv_hader)
        Glide.with(context).load(item.icon).into(im_view)

        tv_name.text = item.user_nickname + ""
        tv_context.text = "淘米号： " + item.serial_no

    }


}